<?php
/*
	获取网站是 http 还是 https
 */
$http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ==

'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&

$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' :

'http://';

echo '网站是',$http_type;